package com.iims.flowable.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.iims.flowable.flow.domain.FlowTaskForm;
import com.iims.flowable.flow.vo.resp.HistoryFlowTaskFormVo;

import java.util.List;

/**
 * @author fanpei
 * @date 2021/7/5 15:11
 */
public interface IFlowTaskFormService extends IService<FlowTaskForm> {

    /**
     * 获取起始基础数据FORMBACK
     *
     * @param procInstId
     * @return
     */
    String getRenderedStartTaskFormBack(String procInstId);

    /**
     * 获取表单Back
     *
     * @param procInstId
     * @param formKey
     * @return
     */
    String getRenderedTaskFormBack(String procInstId, String formKey);

    /**
     * 获取DATAJson
     *
     * @param procInstId
     * @param formKey
     * @return
     */
    FlowTaskForm getRenderedTaskFormWithDataJson(String procInstId, String formKey);

    /**
     * 获取历史过程数据
     *
     * @param procInstId
     * @return
     */
    List<HistoryFlowTaskFormVo> getRenderedTaskForms(String procInstId);

    /**
     * 保存或者修改任务变脸
     *
     * @param taskForm
     */
    void insertUpdateTaskForm(FlowTaskForm taskForm);

    @Deprecated
    void updateTaskFormProInstanceId(FlowTaskForm taskForm);
}
